import React from 'react';
import ReactDOM from 'react-dom';
import {Provider,connect} from 'react-redux'
import store from './store'
class App extends React.Component {
    constructor() {
        super();
        
    }
    render() {
        return <div className=''>
            <button onClick={()=>{this.props.dispatch({type:"ADD",count:100})}}>+</button>
            <h1>{this.props.count}</h1>
        </div>;
    }
}
App = connect((state)=>{
  return {
    count:state.count
  }
},(dispatch)=>{
  return {
    dispatch
  }
})(App)

ReactDOM.render(<Provider store={store}>
  <App/>
</Provider>,document.getElementById('root'))